//
// Created by chen on 2023/6/23.
//

#include "teacher.h"

Teacher::Teacher(string id, string name) {
    this->t_id = id;
    this->t_name = name;
}

Teacher::~Teacher() {

}

void Teacher::showMenu() {
    cout << "****************************************" << endl;
    cout << "***********欢迎使用机房预约系统************" << endl;
    cout << "***********   1、查看所有预约    *********" << endl;
    cout << "***********   2、审核预约   *************" << endl;
    cout << "***********   0、注销登录    ************" << endl;
    cout << "***************************************" << endl;
    cout << "请选择:";
}

void Teacher::viewAllReservation() {
    MachineRoom mr;
    mr.viewAllReservation();
}

void Teacher::logOut() {
    cout << "已注销登录" << endl;
}

void Teacher::checkReservation() {
    string roomId;
    string timeIndex;
    string studentName;
    string yesOrNo;
    cout << "请输入要审核的机房ID:";
    cin >> roomId;
    cout << "请输入要审核的机房时间(周一上午到周五下午为1-10):";
    cin >> timeIndex;
    cout << "请输入要审核的学生姓名:";
    cin >> studentName;
    cout << "请输入审核意见(1表示通过，其余输入表示不通过):";
    cin >> yesOrNo;
    MachineRoom mr;
    mr.checkReservation(roomId, timeIndex, studentName, yesOrNo);
}
